from django.shortcuts import render
from django.http import HttpResponse


def index(request):
    return render(request, 'index.html')


def book(request):
    return HttpResponse('读书')


def movie(request):
    return HttpResponse('电影')


def city(request):
    return HttpResponse('同城')


def book_detail(request, book_id, category):
    text = '当前图书id：%s，分类ID：%s' % (book_id, category)
    return HttpResponse(text)


def login(request):
    next = request.GET.get('next')
    text = '登录完成后，返回页面：%s' % next
    return HttpResponse(text)
